#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>


 // Definition for singly-linked list.
  struct ListNode {
      int val;
      struct ListNode *next;
  };
 


struct ListNode* getKthFromEnd(struct ListNode* head, int k) {
    struct ListNode* fast, * slow;
    fast = slow = head;
    int i = 0;
    for (i = 0; i < k; i++)
    {
        if (fast == NULL)
        {
            return NULL;
        }
        fast = fast->next;
    }
    while (fast)
    {
        slow = slow->next;
        fast = fast->next;
    }
    return slow;

}
int main()
{

	return 0;
}